﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.IO;
using System.Web;
using FrameworkManapro.Utilities;
using GMAC.ReportingSystem.Business.Entities;
//using GMAC.ReportingSystem.DataAccess.wsConnLaoRetail;

namespace GMAC.ReportingSystem.DataAccess
{
    public class LaoRetailDataAccess
    {
       //// private WSConnection wsConn = new WSConnection();
       // private Connection wsConn;// = new Connection(System.Configuration.ConfigurationManager.AppSettings["retailCon"].ToString());  
       // private int reconect = int.Parse(System.Configuration.ConfigurationManager.AppSettings["ReconectNumbers"].ToString());

       // public LaoRetailDataAccess()
       // {
       //     wsConn = new Connection(System.Configuration.ConfigurationManager.AppSettings["retailCon"].ToString());
       // }
       // public LaoRetailDataAccess(string strConnection)
       // {
       //     wsConn = new Connection(strConnection);  
       // }
       // public DataTable ExecuteLaoRetail(string sqlQuery, int vreconect)
       // {
       //     try
       //     {
       //         return wsConn.ExecuteReader(sqlQuery, reconect);
       //     }
       //     catch 
       //     {
                
       //         throw;
       //     }
       // }
       // public DataTable ExecuteLaoRetail(string sqlQuery)
       // {
       //     return wsConn.ExecuteSelect(sqlQuery);
       // }
       // public int ExecuteNonQuery(string sqlQuery)
       // {
       //     return wsConn.ExecuteNonQuery(sqlQuery);
       // }
       // public object ExecuteOperation(string sqlQuery)
       // {
       //     return wsConn.ExecuteOperation(sqlQuery);
       // }
       // public static string ReadValueNode(string fileName, string node)
       // {
       //     string xml;

       //     StreamReader sr = new StreamReader(HttpContext.Current.Server.MapPath(fileName));
       //     xml = sr.ReadToEnd();

       //     LaoRetailQuery laoQueryXml = FrameworkManapro.Utilities.Serializer<Business.Entities.LaoRetailQuery>.ReadXml(xml);
       //     foreach (LaoRetailQueryItem item in laoQueryXml.collectionQuery)
       //     {
       //         if (item.nodeName == node)
       //             return EncriptarDescencriptar.Descifrar(item.nodeValue);
       //     }

       //     return null;
       // }
    }
}
